Skip to content

starknet_transaction_prover: add CORS validation unit tests#14048

Open
avi-starkware wants to merge 1 commit into
avi/privacy/prover-input-validation-tests-v2from
avi/privacy/cors-tests-v2
Open

starknet_transaction_prover: add CORS validation unit tests#14048
avi-starkware wants to merge 1 commit into
avi/privacy/prover-input-validation-tests-v2from
avi/privacy/cors-tests-v2

Conversation

@avi-starkware

Copy link
Copy Markdown
Collaborator

Covers build_cors_layer (empty/wildcard/allowlist branches), cors_mode
labelling, and normalize_cors_allow_origins (scheme/host/userinfo/path/
query rejection, default-port stripping, deduplication of equivalent
origins, and wildcard collapsing the rest of the list).

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@cursor

cursor Bot commented May 17, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only changes; no production CORS or server behavior is modified.

Overview
Adds cors_test (test-only) and wires it from server.rs so CI exercises existing CORS helpers without changing runtime behavior.

The new rstest cases lock in build_cors_layer (no layer when origins are empty; layer present for * or an allowlist), cors_mode labels (disabled / wildcard / allowlist), and normalize_cors_allow_origins—rejecting bad origins (wrong scheme, missing host, userinfo, path, query) and normalizing valid ones (default port stripping, dedup, wildcard collapsing the list to *).

Reviewed by Cursor Bugbot for commit 8342ce5. Bugbot is set up for automated code reviews on this repo. Configure here.

@avi-starkware avi-starkware force-pushed the avi/privacy/prover-input-validation-tests-v2 branch from 62bd425 to e7ccb94 Compare May 17, 2026 17:39
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-tests-v2 branch 2 times, most recently from b5dba94 to 9636c86 Compare May 17, 2026 19:07
@avi-starkware avi-starkware force-pushed the avi/privacy/prover-input-validation-tests-v2 branch from e7ccb94 to 0523284 Compare May 17, 2026 19:07
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-tests-v2 branch from 9636c86 to 20c98e9 Compare May 20, 2026 08:33
@avi-starkware avi-starkware force-pushed the avi/privacy/prover-input-validation-tests-v2 branch from 0523284 to 3275e20 Compare May 20, 2026 08:33
@avi-starkware avi-starkware force-pushed the avi/privacy/prover-input-validation-tests-v2 branch from 3275e20 to 63d5c0b Compare May 31, 2026 10:39
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-tests-v2 branch from 20c98e9 to d437078 Compare May 31, 2026 10:39
Covers build_cors_layer (empty/wildcard/allowlist branches), cors_mode
labelling, and normalize_cors_allow_origins (scheme/host/userinfo/path/
query rejection, default-port stripping, deduplication of equivalent
origins, and wildcard collapsing the rest of the list).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants